
const resources = [
  { id: 1, pageName: '用户页面' },
  { id: 2, pageName: '权限页面' },
  { id: 3, pageName: '资源页面' }
]

const data = [
  { id: 1, role: 'super admin', resources: resources },
  { id: 2, role: 'admin', resources: resources },
  { id: 3, role: 'user', resources: resources.slice(0, 1) }
]

module.exports = [
  {
    url: '/role/getAllRoles',
    type: 'get',
    response: config => {
      console.log('/role/getAllRoles')
      const items = data
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
